<template>
    <div class="con">
        <div class="header">
          <van-nav-bar title="新品派对" left-text="返回"  right-text="分享" left-arrow class="spec" @click-right='share()' @click-left='tab1()'>
           <van-icon name="cluster-o" slot="right"  />
           
            </van-nav-bar>
            <van-action-sheet v-model="show" title="分享到" height:30>
                <div class="share">
                    <share :config='config'></share>
                </div>
            </van-action-sheet>
        </div>
       <div class="main">
           <div class="banner">
               <img src="../assets/p5.gif" alt="">
           </div>
           <div class="main-con">
               <div class="m-header">
                   <img src="../assets/p6.gif" alt="" class="banner-img">
                   <p>11月1日 新品上新</p>
                   <em class="x-line1"></em>
                   <span class="x-line2"></span>
                   <div class="n-goods-list">
                       <div class="good-wrap">
                        <div class="n-good">
                            <figure>
                                <img src="../assets/p7.gif" alt="">
                                <figcaption>
                                    <h2>东方购物频道/APP 11:50</h2>
                                    <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                    <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                    <span>新品价： <em>￥399</em></span>
                                </figcaption>
                            </figure>
                        </div>
                        <div class="shadow"></div>
                   </div>
                   <div class="good-wrap">
                        <div class="n-good">
                            <figure>
                                <img src="../assets/p7.gif" alt="">
                                <figcaption>
                                    <h2>东方购物频道/APP 11:50</h2>
                                    <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                    <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                    <span>新品价： <em>￥399</em></span>
                                </figcaption>
                            </figure>
                        </div>
                        <div class="shadow"></div>
                   </div>
                    <div class="good-wrap">
                        <div class="n-good">
                            <figure>
                                <img src="../assets/p7.gif" alt="">
                                <figcaption>
                                    <h2>东方购物频道/APP 11:50</h2>
                                    <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                    <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                    <span>新品价： <em>￥399</em></span>
                                </figcaption>
                            </figure>
                        </div>
                        <div class="shadow"></div>
                   </div>
                    <div class="good-wrap">
                        <div class="n-good">
                            <figure>
                                <img src="../assets/p7.gif" alt="">
                                <figcaption>
                                    <h2>东方购物频道/APP 11:50</h2>
                                    <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                    <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                    <span>新品价： <em>￥399</em></span>
                                </figcaption>
                            </figure>
                        </div>
                        <div class="shadow"></div>
                   </div>
                   </div>
                   
                    <div class="more-goods">
                        <h2>更多优品推荐</h2>
                        <em></em>
                        <span></span>
                    </div>
                    <div class="m-goods-list">
                        <div class="good-wrap">
                        <div class="n-good">
                            <figure>
                                <img src="../assets/p7.gif" alt="">
                                <figcaption>
                                    <h2>东方购物频道/APP 11:50</h2>
                                    <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                    <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                    <span>新品价： <em>￥399</em></span>
                                </figcaption>
                            </figure>
                        </div>
                        <div class="shadow"></div>
                    </div>
                    <div class="good-wrap">
                            <div class="n-good">
                                <figure>
                                    <img src="../assets/p7.gif" alt="">
                                    <figcaption>
                                        <h2>东方购物频道/APP 11:50</h2>
                                        <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                        <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                        <span>新品价： <em>￥399</em></span>
                                    </figcaption>
                                </figure>
                            </div>
                            <div class="shadow"></div>
                    </div>
                        <div class="good-wrap">
                            <div class="n-good">
                                <figure>
                                    <img src="../assets/p7.gif" alt="">
                                    <figcaption>
                                        <h2>东方购物频道/APP 11:50</h2>
                                        <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                        <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                        <span>新品价： <em>￥399</em></span>
                                    </figcaption>
                                </figure>
                            </div>
                            <div class="shadow"></div>
                    </div>
                        <div class="good-wrap">
                            <div class="n-good">
                                <figure>
                                    <img src="../assets/p7.gif" alt="">
                                    <figcaption>
                                        <h2>东方购物频道/APP 11:50</h2>
                                        <p>一键智能升降来说啊,1锅多上蒸下烤用</p>
                                        <h3>极陶  &nbsp; 多功能升降电火锅</h3>
                                        <span>新品价： <em>￥399</em></span>
                                    </figcaption>
                                </figure>
                            </div>
                            <div class="shadow"></div>
                    </div>
                        </div>
                        
               </div>
               <div class="hot-good">
                    <p>更多热销商品</p> 
                </div>
                <div class="review">
                    <div class="rev-con">
                        <p>- 精 彩 回 顾 -</p>
                    </div>
                </div>
                 <div class="goback-goods">
                    <ul>
                        <li v-for="(item,i) in list" :key='i' @click="detail(item.pid)">
                            <figure>
                               <img :src="item.pimg" alt="">
                               <figcaption>
                                   <p>{{item.pname}}</p>
                                   <p><span>￥{{item.pprice}}</span> <em>￥299</em></p>
                                   <div class="imetbuy">
                                       立即抢购
                                   </div>
                                   <b class="h-line1"></b>
                                </figcaption> 
                            </figure>
                        </li>
                         
                    </ul>
                </div>
           </div>
       </div>
    </div>
</template>

<script>
import * as api from '../../api/getproductlist'
export default {
    name:'Newgoods',
    data(){
        return{
            show:false,
            list:[],
            config:{
                url: 'http://www.baidu.com', // 网址，默认使用 window.location.href
		source:'', // 来源（QQ空间会用到）, 默认读取head标签：<meta name="site" content="http://overtrue" />
		title: 'hello', // 标题，默认读取 document.title 或者 <meta name="title" content="share.js" />
		description: 'hi', // 描述, 默认读取head标签<meta name="description" content="PHP弱类型的实现原理分析" />
		image : '', // 图片, 默认取网页中第一个img标签
		sites: ['qq', 'weibo','qzone' ,], // 启用的站点
		wechatQrcodeTitle: '微信扫一扫：分享', // 微信二维码提示文字
		wechatQrcodeHelper  : '<p>微信里点“发现”，扫一下</p><p>二维码便可将本文分享至朋友圈。</p>'

            }
        }
    },
    methods:{
        tab1(){
            this.$router.go(-1)
        },
        share(){
            this.show=true
        },
        detail(id){
            this.$router.push("/detailpro/" + id);
        }
    },
    mounted(){
         api.getkindpro({classid:1,kindid:1}).then(data=>{
                this.list=data.data.data
            })
    }
}
</script>

<style scoped>
.goback-goods{
    background: #fff;
    min-height: 300px;
    padding: 0 12px;
}
.goback-goods ul{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between
}
.goback-goods ul li{
    width: 32%;
    flex-shrink: 0;
    position: relative;
    margin-bottom: 15px
}
.goback-goods ul li figure{
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
}
.goback-goods ul li figure img{
    width: 100px;
    height: 130px;
    margin-bottom: 20px
}
.goback-goods ul li figure figcaption p:first-child{
    font-size: 13px;
    margin-bottom: 20px
}
.goback-goods ul li figure figcaption p:nth-of-type(2){
    font-size: 13px;
    margin-bottom: 5px
}
.goback-goods ul li figure figcaption p:nth-of-type(2) span{
    color: red;
    font-weight: 600;
    font-size: 14px;
    margin-right: 25px
}
.h-line1{
    display: block;
    width: 33px;
    height: 1px;
    background:#7f7f7f;
    position:absolute;
    right: 9px;
    bottom: 43px;
}
.goback-goods ul li figure figcaption p:nth-of-type(2) em{
    font-style: normal;
    color: #7f7f7f
}
.imetbuy{
    width: 100%;
    height: 30px;
    background: #cc0000;
    line-height: 30px;
    text-align: center;
    color: #fff;
    font-size: 12px
}

.review{
    height: 100px;
    background: #ffb7cd;
    padding:20px 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center
}
.review .rev-con{
    width: 100%;
    height: 60px;
    text-align: center;
    background: #fd5674;
    line-height:60px ;
    color: #fff;
    font-size: 24px
}
figure,h2,h3,p{
    margin: 0
}
.hot-good{
    height: 60px;
    background: #fff;
    width: 100%;
    overflow: hidden;
}
.hot-good p{
    text-align: center;
    height: 30px;
    line-height: 30px;
    margin-top: 5px;
    color: #000;
    font-weight: 600;
    font-size: 12px
}
.more-goods{
    width: 100%;
    text-align: center;
    height: 80px;
    line-height: 80px;
    color:#da6049;
    position: relative;
}
.more-goods em{
    position: absolute;
    width: 22%;
    height: 1.5px;
    background:#433836;
    display: block;
    left: 43px;
    top: 40px 
}
.more-goods span{
    position: absolute;
    width: 21%;
    height: 1.5px;
    background:#433836;
    display: block;
    right: 48px;
    top: 40px 
}
.n-good img{
    margin: 0!important;
    width: 140px;
    height: 140px;
}
.n-good{
    height: 170px;
    background:#f69781;
    width: 100%;
    box-sizing: border-box;
    padding:0 6px; 
    padding-top:15px;
    margin-top: 25px;
    position: relative;
    z-index: 3;
}
.n-good figure{
    display: flex;
    margin-left: 3px
}
.shadow{
    width: 100%;
    height: 170px;
    background: #fff;
    position: absolute;
    bottom: -4px;
    left: 4px;
}
.good-wrap{
margin:0 10px;
margin-bottom: 10px;
position: relative; 
}
.n-good figure h2{
    width: 93%;
    height: 20px;
    line-height: 20px;
    background: #fff;
    border: 1px solid #cf5334;
    border-radius: 10px;
    font-size: 10px;
    text-indent: 5px;
    color:#d36c56;
    background: #fdeaec 
}
.n-good figure figcaption{
    margin-left: 10px;
    margin-top: 15px
}
.n-good figure figcaption p{
    width: 80%;
    line-height: 20px;
    color: #fefcf0;
    font-size: 14px;
    margin-top: 5px
}
.n-good figure figcaption h3{
    font-size: 12px;
    margin-top: 5px;
    color:#fefcf0
}
.n-good figure figcaption span{
    color: #fff;
    margin-top: 10px;
    display: block;
    font-size: 14px
}
.n-good figure figcaption span em{
    display: inline-block;
    color: red;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
}
.main-con{
    background:#f7c7b9;
    margin-top:-4px;

}
.m-header{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 1000px;
    padding-bottom: 20px
}
.m-header .banner-img{
    width:90px;
    margin-top: 30px 
}
.m-header p{
    font-size:14px;
    color: #656364 
}
.m-header .x-line1{
    display: block;
    width: 25%;
    position: absolute;
    height: 1px;
    background:#8b7e79;
    left: 20px ;
    top: 60px
}
.m-header .x-line2{
    display: block;
    width: 25%;
    position: absolute;
    height: 1px;
    background:#8b7e79;
    right: 20px ;
    top: 60px
}
.social-share{
    display: flex;
    justify-content: space-between;
    padding: 0 38px
}
.share{
    height: 100px;
}

.con{
    display: flex;
    flex-direction: column;
    background:#f3f3f3;
    height: 100vh;
}
.van-nav-bar__text{
    color: #000
}
.van-nav-bar .van-icon{
    color: #333;
    margin-top: 3px
}
.van-nav-bar__title{
    font-size: 15px
}
.main{
    flex: 1;
    overflow: auto
}
.banner img{
    width: 100%;
}
</style>